Xbasic

FILE.APPEND_LINE Function

Syntax

Bytes_Appended as N = FILE.Append_Line(C Filename, C content)

Arguments

FilenameCharacter

The file that receives the character or blob data.

contentCharacter

The text to add to FileName.

Returns

Bytes_AppendedNumeric

Returns the size increase of the file.

Description

Writes a string to a file followed by a carriage return and line feed.

Discussion

The FILE.APPEND_LINE() method appends text to the end of a file. It terminates each append with a CR-LF. The method creates the file if it does not already exist.

Example

? File.Append_Line("MyFile.txt", "the rest of the line...")
= 23
? File.Append_Line("MyFile.txt", "And some more...")
= 16

See Also